/*
 * This Smart Framework helps in developing the project very easily with Dynamic Injection, 
 * Dynamic Lookup. This framework provides the developer to create factory classes and implement 
 * the DAO, Service, etc..
 * Copyright (C) 2011  R.Satheesh Kumar alias GURU
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * EmailId: pulsarcoder@gmail.com
 */
package org.jsmart.factory.bean;

/**
 * This class is used as the data transfer object for accessing,
 * storing the bean object
 * @author R.Satheesh Kumar alias guru
 * @version 1.0-a
 * @since 29-12-2011
 */
public class BeanTO {
	private String beanName, beanId, beanClass, beanType, initMethod, parentClass, factoryBean, factoryMethod;
	private boolean isAbstract, isSingleton;
	/**
	 * This property is used to set the field value for the bean class 
	 */
	private PropertyTO[] properties;
	/**
	 * This property is used to set the argument values of constructor of bean class
	 */
	private ConstructorArgTO[] constructorArgs;
	/**
	 * @return the beanName
	 */
	public String getBeanName() {
		return beanName;
	}
	/**
	 * @param beanName, the beanName to set
	 */
	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}
	/**
	 * @return the beanId
	 */
	public String getBeanId() {
		return beanId;
	}
	/**
	 * @param beanId, the beanId to set
	 */
	public void setBeanId(String beanId) {
		this.beanId = beanId;
	}
	/**
	 * @return the beanClass
	 */
	public String getBeanClass() {
		return beanClass;
	}
	/**
	 * @param beanClass, the beanClass to set
	 */
	public void setBeanClass(String beanClass) {
		this.beanClass = beanClass;
	}
	/**
	 * @return the beanType
	 */
	public String getBeanType() {
		return beanType;
	}
	/**
	 * @param beanType, the beanType to set
	 */
	public void setBeanType(String beanType) {
		this.beanType = beanType;
	}
	/**
	 * @return the initMethod
	 */
	public String getInitMethod() {
		return initMethod;
	}
	/**
	 * @param initMethod, the initMethod to set
	 */
	public void setInitMethod(String initMethod) {
		this.initMethod = initMethod;
	}
	/**
	 * @return the parentClass
	 */
	public String getParentClass() {
		return parentClass;
	}
	/**
	 * @param parentClass, the parentClass to set
	 */
	public void setParentClass(String parentClass) {
		this.parentClass = parentClass;
	}
	/**
	 * @return the factoryBean
	 */
	public String getFactoryBean() {
		return factoryBean;
	}
	/**
	 * @param factoryBean, the factoryBean to set
	 */
	public void setFactoryBean(String factoryBean) {
		this.factoryBean = factoryBean;
	}
	/**
	 * @return the factoryMethod
	 */
	public String getFactoryMethod() {
		return factoryMethod;
	}
	/**
	 * @param factoryMethod, the factoryMethod to set
	 */
	public void setFactoryMethod(String factoryMethod) {
		this.factoryMethod = factoryMethod;
	}
	/**
	 * @return the isAbstract
	 */
	public boolean isAbstract() {
		return isAbstract;
	}
	/**
	 * @param isAbstract, the isAbstract to set
	 */
	public void setAbstract(boolean isAbstract) {
		this.isAbstract = isAbstract;
	}	
	/**
	 * @return the isSingleton
	 */
	public boolean isSingleton() {
		return isSingleton;
	}
	/**
	 * @param isSingleton, the isSingleton to set
	 */
	public void setSingleton(boolean isSingleton) {
		this.isSingleton = isSingleton;
	}
	/**
	 * @return the properties
	 */
	public PropertyTO[] getProperties() {
		return properties;
	}
	/**
	 * @param properties the properties to set
	 */
	public void setProperties(PropertyTO[] properties) {
		this.properties = properties;
	}
	/**
	 * @return the constructorArgs
	 */
	public ConstructorArgTO[] getConstructorArgs() {
		return constructorArgs;
	}
	/**
	 * @param constructorArgs the constructorArgs to set
	 */
	public void setConstructorArgs(ConstructorArgTO[] constructorArgs) {
		this.constructorArgs = constructorArgs;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj == this)
			return true;
		return false;
	}
	
	@Override
	public int hashCode() {
		return beanId.hashCode();
	}
}
